'use strict';

/**
 * The main MVC app module.
 *
 * @type {angular.Module}
 */

var homepageModule = angular.module('homepageModule', ['ngTagsInput', 'LocalStorageModule','multi-select', 'ngAnimate', 'ui.bootstrap']);

	// homepageModule.factory('Recherche', ['$http', '$q', 'localStorageService', 'CacheService', function($http, $q, localStorageService, CacheService) {
	// 	return new RechercheModel($http, $q, localStorageService, CacheService);
	// }]);

	homepageModule.factory('Recherche', ['$http', '$q', function($http, $q) {
		return new RechercheModel($http, $q);
	}]);

	homepageModule.factory('Home', ['$http', function($http) {
		return new HomeModel($http);
	}]);

	homepageModule.factory('StringManager', ['$http', '$rootScope', function($http, $rootScope) {
		return new StringManagerModel($http, $rootScope);
	}]);

	homepageModule.directive('diffculte', function factory() {
	    return new DifficulteDirective();
	});

	homepageModule.directive('linktosejour', ['StringManager', function factory(StringManager) {
	    return new LinktoSejourDirective(StringManager);
	}]);	

	homepageModule.factory('FicheManager', ['$http', function($http) {
		return new FicheManagerModel($http);
	}]);

	homepageModule.controller('RechercheController', ['$scope', 'Recherche', 'StringManager', '$rootScope',  RechercheController]);
	homepageModule.controller('HomeController', ['$scope', 'Home', 'StringManager',  HomeController]);
	